import numpy as np
import pymysql
import pandas as pd
from sqlalchemy import create_engine

a = np.load('1.npy')
b = pd.DataFrame(a)

db = pymysql.connect(host='localhost',port=3306,user='root',passwd='root',db='python_database')
# 创建一个游标对象
cursor = db.cursor()
# sql = 'SELECT * FROM 2019_lpl_spring_resourse'
for i in 15:
    sql = 'INSERT INTO 2019_lpl_spring_resourse(Rank) VALUES a[i][0] '
# #
    da = cursor.execute(sql)
    db.commit()
# dd = cursor.fetchall()
# print(dd)


# b.to_sql('2019_lpl_spring_resourse',engine,index=False)
#
#
#
#

